<?php
	include('hospital.html');
	require_once 'config.php' ;

/*	function hi(){
	echo "Hi this is manuli in the fuction!!";
	}
hi();
*/
    if (empty($_REQUEST))
    $anchor = "home"; 
    else
    {
//    print_r($_REQUEST);
    $anchor = $_REQUEST["page"];
    }
    
	$count = "SELECT count(*) from web_site";
	$query = "SELECT side_bar, main_content from web_site";

	$connect1 = mysql_query($query,$connect_function);
	echo mysql_error($connect_function);
	$number = mysql_num_rows($connect1);
	//echo $number;
//      	mysql_close($connect_function);	

?>
	<html>
	<title>Hospital Home</title>
	<body>
	<table style="border: 0px; width: 100%;" cellpadding="0" cellspacing="0">
		<tr>
		    <td style="width: 150px; vertical-align: top;">
		        <div id="sidebar" style="display: block;">
			    <table style="border: 0px; width: 150px;">
<?php
			    for($i=0; $i < $number; $i++) {	
				$bar_name = mysql_fetch_assoc($connect1);
?>	
				    <tr><td class="menu"><a href="home.php?page=<?= $bar_name["side_bar"] ?>" > <?= $bar_name["side_bar"] ?></td></a>
				    <tr><td>&nbsp;</td></tr>
<?php
			}
?>
		        </table>
		        </div>
            </td>
            <td>&nbsp;</td>
          <td style= "vertical-align: top;">
                <div id="content" style="border: 1px solid red; width : 100% height: 1500px;">
		                   <? 
    	                    $anchor = mb_strtolower($anchor);                     
    	                    $anchor = "'". $anchor ."'";
    	                    $query2= "SELECT main_content from web_site where side_bar=";
    	                    $query2 = $query2 . $anchor .";";
//    	                    echo $query2;
		                   	$connect1 = mysql_query($query2,$connect_function);
           					$bar_name = mysql_fetch_assoc($connect1);
		                   echo $bar_name["main_content"]; ?>
                </div>
            </td>
        </table>
    </body>
</html>
<?php
?>

